package com.wx.tgp.designpattern.prototypePattern.prototype;

/**
 * Created by Administrator on 2016/10/9.
 */
public class Resume implements  Cloneable{

    private String name;
    private String company;
    private WorkDate workDate;
    public Resume(){
        workDate = new WorkDate();
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }
    public void setWorkDate(String workDate) {
        this.workDate.setWorkDate(workDate);
    }

    public void display(){
        System.out.println("姓名："+this.name+"，公司："+this.company+"，工作经历："+workDate.getWorkDate());
    }
    public Resume Clone(){
        Resume resume = null;
        try{
            resume = (Resume) super.clone();
        }catch (Exception e){
            e.printStackTrace();
        }
        return resume;
    }
}
